package com.zhuzi.utils;


import javax.servlet.http.HttpServletRequest;

/**
 * 2022/4/24 13:26
 *
 * @author by yd
 */
public class RequestUtils {

    public static String getBaseUrl(HttpServletRequest request) {
        StringBuffer url = request.getRequestURL();
        return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(request.getSession().getServletContext().getContextPath()).append("/").toString();
    }


}
